package com.sure.supermarketserver.security.manager.dao;

import com.sure.supermarketserver.security.manager.Manager;
import com.sure.supermarketserver.security.manager.ManagerDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

public interface ManagerDao {

    //查询
    List<Manager> findManagerList(ManagerDto dto);

    //增加
    void insertManager(ManagerDto dto);

    //修改
    void updateManager(ManagerDto dto);

    //删除
    @Delete("delete from staff where st_id = #{st_id}")
    void deleteManager(String id);

    @Insert("insert into staff_role (st_id,ro_id)values(#{st_id},'1100') ")
    void insertRole(ManagerDto dto);
}
